﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;

namespace MangioneManagement.Models
{
    public class MangioneManagementDbContext : DbContext
    {
#if DEBUG == false
		public DbSet<Customer> Customers { get; set; }
		public DbSet<Product> Products { get; set; }
		public DbSet<Transaction> Transactions { get; set; }
#else
        public List<Customer> Customers
        {
            get
            {
                return new List<Customer> { 
                new Customer {   Country = "Argentina",
                                 CustomerID = 1,
                                 Email="hernan.zbucki@gmail.com",
                                 FirstName="Hernan",
                                 LastName="Zbucki",
                                 Locality="CABA",                            
                                 MobilePhone="1164529330",
                                 Phone="20534439",
                                 Province="CABA"                                 
                              }, 
                 new Customer {  Country = "España",
                                 CustomerID = 2,
                                 Email="pepe@gmail.com",
                                 FirstName="Pepe",
                                 LastName="Guardiola",
                                 Locality="Barcelona",                                
                                 MobilePhone="1155447845",
                                 Phone="124455",
                                 Province="Barcelona"                                 
                              }
                            };
            }
            set { }
        }
        public List<Product> Products { get; set; }
        public List<Transaction> Transactions { get; set; }
#endif

        public MangioneManagementDbContext()
        {
            //Database.SetInitializer<MangioneManagementDbContext>(null);
            // Database.SetInitializer(new DropCreateDatabaseAlways<MangioneManagementDbContext>());
        }
    }
}